package com.xiaoge.service.impl;

import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaoge.entity.EduOrderInfo;
import com.xiaoge.mapper.EduOrderInfoMapper;
import com.xiaoge.service.EduOrderInfoService;
/**
* @Author: 冷俊杰
* @Description: 首页展示
* @DateTime: 2022/11/9 20:01
**/
@Service
public class EduOrderInfoServiceImpl extends ServiceImpl<EduOrderInfoMapper, EduOrderInfo> implements EduOrderInfoService{

    @Override
    public Map<Object, Object> ListHomePage() {
        Map<Object, Object> map=new HashMap<>();
        //查询今日，本月，支付情况
        List<EduOrderInfo> eduOrderInfos = this.baseMapper.ListEduOrderInfoByPayType();
        //查询课程，今日，本月，总购买情况
        List<EduOrderInfo> infoList = this.baseMapper.ListEduOrderInfoByPay();
        map.put("eduOrderInfos",eduOrderInfos);
        map.put("infoList",infoList);
        return map;
    }
}